<template>
  <div class="leaderSpeak">
    <el-form ref="form" :model="labForm" label-width="120px">
      <el-form-item label="实验室介绍：" class="mgTop">
        <el-input type="textarea" v-model="labForm.introduction" :rows="8"></el-input>
      </el-form-item>
      <el-form-item class="mgTop">
        <el-button type="primary" @click="onSubmit" :loading="loading">提交</el-button>
<!--        <el-button>取消</el-button>-->
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
  import { updateIntroduction, getIntroduction } from '@/api/eventManage'
  export default {
    data() {
      return {
        loading:false,
        fileLoading: false,
        mottoFileList: [],
        labForm: {
          introduction: ''
        }
      }
    },
    created() {
      //
      this.getLabInfo()
    },
    methods: {
      async getLabInfo(){
        const res = await getIntroduction()
        this.labForm.introduction = res.message
      },
      async onSubmit(){
        this.loading = true
        await updateIntroduction(this.labForm)
        this.loading = false
        this.$message({
          type: 'success',
          message: '更新成功'
        })

      }
    },
    computed: {},
    components: {}
  }
</script>

<style lang="scss" scoped>
  .leaderSpeak{
    width: 55%;
    .mgTop{
      margin-top: 20px;
    }
  }

</style>
